<%-- 
    Document   : accountDashboard
    Created on : May 29, 2012, 10:20:20 PM
    Author     : Owner
--%>



<%--
<%
Long userId = Long.parseLong(String.valueOf(session.getAttribute("loginUserId")));
if (Long.parseLong(String.valueOf(session.getAttribute("loginRoleId"))) == 0) {%>
<%@include file="/jsp/top.jsp"%>
<%} else if (Long.parseLong(String.valueOf(session.getAttribute("loginRoleId"))) == 1) {%>
<%@include file="/jsp/userTop.jsp"%>
<%} else if (Long.parseLong(String.valueOf(session.getAttribute("loginRoleId"))) == 2) {%>
<%@include file="/jsp/adminTop.jsp"%>
<%}%>--%>

<%@include file="/jsp/top.jsp"%>

<html>
    <head>
        <title>Account Dashboard</title>
    </head>
    <body class="user-account-dashboard">

        <div class="clear"></div>
        <table cellspacing="5px" width="100%" align="center">
            <tr>
                <td>
                    <table cellspacing="5px" width="100%" align="center">
                        <tr>
                            <td style="vertical-align: top;" width="20%">
                                <div class="box-left box-menu">
                                    <div class="block block-account">
                                        <div class="block-title">
                                            <strong>
                                                <span>My Account</span>
                                            </strong>
                                        </div>
                                        <div class="block-content">
                                            <ul>
                                                <li><a class="show-dashboard" href="./userAccount.do?action=showAccountDashboard">Account Dashboard</a></li>
                                                <li><a class="show-dashboard" href="./userAccount.do?action=showEditUserPersonalInfo&changePassword='N'">Account Information</a></li>
                                                <li><a class="show-dashboard" href="./userAccount.do?action=showManageAddress">Manage Address</a></li>
                                                <li><a class="show-dashboard" href="./payment.do?action=showUserOrders">My Orders</a></li>
                                                <li><a class="show-dashboard" href="./userAccount.do?action=showAccountDashboard">My Wishlists</a></li>
                                                <li><a class="show-dashboard" href="./userAccount.do?action=showNewsletter">Newsletter Subscription</a></li>
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                            </td>
                            <td style="vertical-align: top;" width="80%">
                                <table align="center" border="1" cellspacing="10px" width="100%">
                                    <tr>
                                        <td>
                                            <div class="account-dashboard default">
                                                <div class="page-title"><h1>My DashBoard </h1></div>
                                                <table align="center" cellspacing="10px" width="100%">
                                                    <tr>
                                                        <td colspan="2">
                                                            <div class="welcome-msg">
                                                                <p class="hello">
                                                                    <strong>Hello, <%= session.getAttribute("loginName")%></strong>
                                                                </p>
                                                                <p>From your My Account Dashboard you have the ability to view a snapshot of your recent account activity and update your account information. Select a link below to view or edit information.</p>
                                                            </div>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <div class="box-main box-info">
                                                                <div class="my-account">
                                                                    <div class="dashboard">
                                                                        <table align="center" cellspacing="10px" width="100%">
                                                                            <tr>
                                                                                <td width="50%">
                                                                                    <div class="col2-set">
                                                                                        <logic:present name="userInfo" scope="request">
                                                                                            <div class="col1-box">
                                                                                                <logic:empty name="userInfo" scope="request">
                                                                                                    <div>No Records Found</div>
                                                                                                </logic:empty>
                                                                                                <div class="box">
                                                                                                    <div class="box-title">
                                                                                                        <table cellspacing="10px" width="100%">
                                                                                                            <tr>
                                                                                                                <td><h2>Contact Information</h2></td>
                                                                                                                <td><a class="editcontactinfo" href="./userAccount.do?action=showEditUserPersonalInfo&changePassword='N'">Edit</a></td>
                                                                                                            </tr>
                                                                                                        </table>
                                                                                                    </div>
                                                                                                    <div class="box-content">
                                                                                                        <bean:message key="user.name"/><bean:write name="userInfo" property="prefix"/>&nbsp;<bean:write name="userInfo" property="firstName"/>&nbsp;<bean:write name="userInfo" property="middleName" ignore="true"/>&nbsp;<bean:write name="userInfo" property="lastName"/>.<br/>
                                                                                                        <bean:write name="userInfo" property="profession" ignore="true"/>&nbsp; <bean:message key="user.mobileno"/> <bean:write name="userInfo" property="mobileNo"/><br/>
                                                                                                        <bean:message key="user.email"/><bean:write name="userInfo" property="emailId"/><br/>
                                                                                                        <bean:message key="user.dateofbirth"/><bean:write name="userInfo" property="dateOfBirth"/><br/>
                                                                                                        <a class="changepassword" href="./userAccount.do?action=showEditUserPersonalInfo&changePassword='Y'">Change Password</a>
                                                                                                    </div>
                                                                                                </div>
                                                                                            </div>
                                                                                            <div class="col2-box">
                                                                                                <div class="box">
                                                                                                    <div class="box-title">
                                                                                                        <table cellspacing="10px" width="100%">
                                                                                                            <tr>
                                                                                                                <td><h2>Newsletter</h2></td>
                                                                                                                <td><a class="editnewsletter" href="./userAccount.do?action=showNewsletter">Edit</a></td>
                                                                                                            </tr>
                                                                                                        </table>
                                                                                                    </div>
                                                                                                    <div class="box-content">
                                                                                                        <logic:equal name="userInfo" property="newsLetter" value="1">
                                                                                                            You are currently subscribed to general newsletter.
                                                                                                        </logic:equal>
                                                                                                        <logic:notEqual name="userInfo" property="newsLetter" value="1">
                                                                                                            You are currently not subscribed to any newsletter.
                                                                                                        </logic:notEqual>
                                                                                                    </div>
                                                                                                </div>
                                                                                            </div>
                                                                                        </logic:present>
                                                                                    </div>
                                                                                </td>                                                                            
                                                                                <td width="50%">
                                                                                    <div class="col2-set">
                                                                                        <logic:present name="userAddressInfo" scope="request">
                                                                                            <div class="col-box">
                                                                                                <logic:empty name="userAddressInfo" scope="request">
                                                                                                    <div>No Records Found</div>
                                                                                                </logic:empty>
                                                                                                <% int i = 0;%>

                                                                                                <div class="col-box-title">
                                                                                                    <table cellspacing="10px" width="100%">
                                                                                                        <tr>
                                                                                                            <td><h2>Address Information</h2></td>
                                                                                                            <td><a class="manageaddress" href="./userAccount.do?action=showManageAddress">Manage Addresses</a></td>
                                                                                                        </tr>
                                                                                                    </table>
                                                                                                </div>
                                                                                                <logic:iterate id="addressInfo" name="userAddressInfo" scope="request">
                                                                                                    <%i++;%>
                                                                                                    <div class="col-box-content">
                                                                                                        <% if (i == 1) {%>
                                                                                                        <div class="col1-box">
                                                                                                            <h4 class="legend">Billing Address</h4>
                                                                                                            <address>
                                                                                                                <bean:write name="addressInfo" property="addrTitle"/>&nbsp;<bean:write name="addressInfo" property="addrFirstName"/>&nbsp;<bean:write name="addressInfo" property="addrMiddleName" ignore="true"/>&nbsp;<bean:write name="addressInfo" property="addrLastName"/>.<br/>
                                                                                                                <bean:write name="addressInfo" property="house"/><br/>
                                                                                                                <bean:write name="addressInfo" property="street"/><br/>
                                                                                                                <bean:write name="addressInfo" property="city"/>&nbsp;
                                                                                                                <bean:write name="addressInfo" property="pinCode"/><br/>
                                                                                                                <bean:write name="addressInfo" property="state"/><br/>
                                                                                                                <bean:write name="addressInfo" property="contact"/>
                                                                                                            </address>
                                                                                                            <a class="editaddress" href="./userAccount.do?action=showAddress&addrTypeId=<%=i%>">Edit Address</a>
                                                                                                        </div>
                                                                                                        <%} else if (i == 2) {%>
                                                                                                        <div class="col1-box">
                                                                                                            <h4 class="legend">Delivery Address</h4>
                                                                                                            <address>
                                                                                                                <bean:write name="addressInfo" property="addrTitle"/>&nbsp;<bean:write name="addressInfo" property="addrFirstName"/>&nbsp;<bean:write name="addressInfo" property="addrMiddleName" ignore="true"/>&nbsp;<bean:write name="addressInfo" property="addrLastName"/>.<br/>
                                                                                                                <bean:write name="addressInfo" property="house"/><br/>
                                                                                                                <bean:write name="addressInfo" property="street"/><br/>
                                                                                                                <bean:write name="addressInfo" property="city"/>&nbsp;
                                                                                                                <bean:write name="addressInfo" property="pinCode"/><br/>
                                                                                                                <bean:write name="addressInfo" property="state"/><br/>
                                                                                                                <bean:write name="addressInfo" property="contact"/>
                                                                                                            </address>
                                                                                                            <a class="editaddress" href="./userAccount.do?action=showAddress&addrTypeId=<%=i%>">Edit Address</a>
                                                                                                        </div>
                                                                                                        <%}%>
                                                                                                    </div>
                                                                                                </logic:iterate>
                                                                                            </div>
                                                                                        </logic:present>
                                                                                    </div>
                                                                                </td>
                                                                            </tr>
                                                                        </table>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </td>                                                        
                                                    </tr>
                                                </table>
                                            </div>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td><%@include file="/jsp/footer.jsp" %></td>
            </tr>
        </table>
        <div class="wrapper">
            <noscript> &lt;div class="noscript"&gt; &lt;div class="noscript-inner"&gt; &lt;p&gt;&lt;strong&gt;JavaScript seem to be disabled in your browser.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;You must have JavaScript enabled in your browser to utilize the functionality of this website.&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; </noscript>
        </div>        
    </body>
</html>
